package com.web.cms.doc.message;

import com.blue.core.dict.State;
import com.blue.validation.IdList;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

public class DocRequest implements Serializable
{
	private static final long serialVersionUID = 1L;

	@NotNull(groups = { UpdateModel.class }, message = "文档ID不能为空")
	@Null(groups = { SaveModel.class }, message = "文档ID必须为空")
	private Integer id;
	@NotNull(groups = { SaveModel.class }, message = "栏目ID不能为空")
	private Integer channelId;
	@NotNull(groups = { SaveModel.class }, message = "网站ID不能为空")
	private Integer webId;
	@NotNull(groups = { SaveModel.class }, message = "用户ID不能为空")
	private Integer userId;
	@NotBlank(groups = { SaveModel.class }, message = "文档作者不能为空")
	@Size(min = 0, max = 20, groups = { SaveModel.class, UpdateModel.class }, message = "文档作者长度[0-20]")
	private String author;
	@NotBlank(groups = { SaveModel.class, UpdateModel.class }, message = "文档标题不能为空")
	@Size(min = 0, max = 100, groups = { SaveModel.class, UpdateModel.class }, message = "文档标题长度[0-100]")
	private String title;
	@Size(min = 0, max = 10, groups = { SaveModel.class, UpdateModel.class }, message = "文档标题颜色长度[0-10]")
	private String color;
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "文档标题图片长度[0-200]")
	private String pic;
	@Size(min = 0, max = 500, groups = { SaveModel.class, UpdateModel.class }, message = "文档简介长度[0-500]")
	private String summary;
	private String contentUrl;
	private Date publishTime;
	private Date createTime;
	private Date updateTime;
	private Integer sort;
	private State state;
	private Integer views;
	private Integer comments;
	private Integer files;
	private Integer fileSize;

	private String content;
	@IdList(groups = { SaveModel.class, UpdateModel.class }, message = "文件ID列表格式错误")
	private String fileIds;

	public DocRequest()
	{
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Integer getChannelId()
	{
		return channelId;
	}

	public void setChannelId(Integer channelId)
	{
		this.channelId = channelId;
	}

	public Integer getWebId()
	{
		return webId;
	}

	public void setWebId(Integer webId)
	{
		this.webId = webId;
	}

	public Integer getUserId()
	{
		return userId;
	}

	public void setUserId(Integer userId)
	{
		this.userId = userId;
	}

	public String getAuthor()
	{
		return author;
	}

	public void setAuthor(String author)
	{
		this.author = author;
	}

	public String getTitle()
	{
		return title;
	}

	public void setTitle(String title)
	{
		this.title = title;
	}

	public String getColor()
	{
		return color;
	}

	public void setColor(String color)
	{
		this.color = color;
	}

	public String getPic()
	{
		return pic;
	}

	public void setPic(String pic)
	{
		this.pic = pic;
	}

	public String getSummary()
	{
		return summary;
	}

	public void setSummary(String summary)
	{
		this.summary = summary;
	}

	public String getContentUrl()
	{
		return contentUrl;
	}

	public void setContentUrl(String contentUrl)
	{
		this.contentUrl = contentUrl;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public Date getPublishTime()
	{
		return publishTime;
	}

	public void setPublishTime(Date publishTime)
	{
		this.publishTime = publishTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Integer getSort()
	{
		return sort;
	}

	public void setSort(Integer sort)
	{
		this.sort = sort;
	}

	public State getState()
	{
		return state;
	}

	public void setState(State state)
	{
		this.state = state;
	}

	public Integer getViews()
	{
		return views;
	}

	public void setViews(Integer views)
	{
		this.views = views;
	}

	public Integer getComments()
	{
		return comments;
	}

	public void setComments(Integer comments)
	{
		this.comments = comments;
	}

	public Integer getFiles()
	{
		return files;
	}

	public void setFiles(Integer files)
	{
		this.files = files;
	}

	public Integer getFileSize()
	{
		return fileSize;
	}

	public void setFileSize(Integer fileSize)
	{
		this.fileSize = fileSize;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public String getFileIds()
	{
		return fileIds;
	}

	public void setFileIds(String fileIds)
	{
		this.fileIds = fileIds;
	}

}
